package com.ehi.tsconfig.dao;

import com.ehi.tsconfig.domain.Carrier;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;

@DirtiesContext
@ContextConfiguration(locations = {"/test-spring.xml"})
public class CarrierDaoIntTest extends AbstractTransactionalJUnit4SpringContextTests {

    @Autowired
    private CarrierDao carrierDao;

    @Test
    public void testGetById() {
        Carrier carrier = carrierDao.getById(9001L);
        Assert.assertEquals("CA", carrier.getStateAbbr());
    }
}
